1. Field of the Invention
The present invention is directed generally to mobile wireless devices that receive streaming video. In particular, the present invention is directed to a mobile wireless device controlling the encoding rate of a received video stream.
2. Description of the Related Art
Providers of mobile wireless communication networks are offering additional services beyond voice communications. One highly desirable service to add is streaming video. This service allows a video streaming device to stream video to a receiving mobile wireless device over a wireless communications network.
A video is a series of image frames that can be shown in sequence by a video player. A video player sequentially displays the frames to create a video viewing experience. The quality of the video viewing experience is influenced by the resolution of the frames and the rate at which the frames are played (the playback frame rate). Videos with higher frame resolutions are perceived by most viewers as having higher quality. The playback frame rate is also important for good quality video viewing. If the playback frame rate is too slow, objects in the video will seem to move in an erratic fashion.
A video is originally recorded at a video bit rate (the video rate) that is proportional to the product of the recorded frame resolution and the recorded frame rate. However, high video rates may require too much memory to store or too much bandwidth to transmit in some applications. Video encoders may be used to compress the original video stream, resulting in an encoded video stream with an encoding bit rate (the encoding rate) that is substantially less than the original video rate. However, since most encoding methods are lossy, slower encoding rates usually mean poorer video quality when an encoded video is decoded and played back.
A video streaming device usually sends out an encoded video in a stream at a streaming bit rate (the streaming rate) that is approximately equal to the encoding rate. A transmit buffer on the video streaming device can store part of the encoded video stream that the video streaming device is not yet ready to send and a receive buffer on the receiving mobile wireless device can store the part of the encoded video stream that the receiving device is not yet ready to playback. The transmit buffer allows the streaming rate to be slightly faster or slower than the encoding rate for short periods of time. The transmit buffer fills (or empties) at a rate equal to the encoding rate minus the streaming rate. The receive buffer allows the streaming rate to be slightly faster or slower than the playback rate for short periods of time. The receive buffer fills (or empties) at a rate equal to the streaming rate minus the playback rate, where the playback bit rate is the product of the playback frame rate and the number of bits per frame. Since these buffers have a finite size, larger or longer variations can lead to buffer overflow or starvation (buffer empty), either of which can cause degradation or interruption in the playback of the video.
For example, increasing the encoding rate of the video streaming device creates a risk of buffer overflow. When the video streaming device increases its encoding rate, sometime afterwards it will increase its streaming rate to prevent buffer overflow in the video streaming device. The increased streaming rate will cause the receive buffer on the receiving device to fill up. This happens because the receiving device is still removing video from the receive buffer that was encoded at the old, slower encoding rate while video is being added at a new, higher encoding rate. The slower encoding rate video may not be used up before the new higher encoding rate video overflows the receiver buffer.
The conventional approach to the problems of receive buffer overflow or starvation is to size the receive buffer large enough to mask the effects of anticipated interruptions or changes in the streaming rate of the video. However, this can result in the receive buffer being quite large, which is undesirable. Larger components in general are undesirable for a mobile device. Also, a larger buffer lengthens initial delay in playback, which is undesirable. For a buffer to effectively guard against both overflow and starvation, it must be about half full and half empty. The initial delay in playback is the time from when the mobile wireless receiving device begins receiving a stream to the time when the buffer fills to the halfway point. When the buffer is larger, this initially delay is longer.
These conflicting design constraints on buffer size become more severe as the streaming and encoding rate of the video streams become faster. What is needed is a mobile wireless communication device to receive video with a mechanism to control the video encoding and streaming rates to prevent overflow or starvation of the receive buffer.